window.onload=function(){
	var bgImgSrc=localStorage.webSkin?JSON.parse(localStorage.webSkin).bgImgSrc:'static/img/index_bg.jpg'
	var skinCss=localStorage.webSkin?JSON.parse(localStorage.webSkin).skinCss:'static/css/skinCss/skin0.css'	
	$(".bgImg").attr('src',bgImgSrc)
	$("<link>").attr({ 
		rel: "stylesheet",
		type: "text/css",
		href: skinCss
	})
	.appendTo("head");
	if(JSON.parse(localStorage.webSkin).bgCanvace){
		$('body').prepend('<canvas id="starsCanvas" style="position: absolute; left: 0; top: 0;"></canvas>')
		$("<scri"+"pt>"+"</scr"+"ipt>").attr({src:JSON.parse(localStorage.webSkin).bgCanvace,type:'text/javascript',id:'load'}).appendTo($('head').remove('#loadscript')); 	
	}
}

